import * as types from './action-types'
export function add(n) {
  return { type: types.ADD, num: n }
}
export function minus(n) {
  return function (dispatch, getstate) {
    setTimeout(() => {
      dispatch({ type: types.MINUS, num: n })
    }, 1000);
  }
}

export function changeColor(col) {
  return { type: types.CHANGECOLOR, col }
}